package com.atguigu.gulimall.product.service;

import com.atguigu.gulimall.product.vo.Catelog2Vo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.atguigu.common.utils.PageUtils;
import com.atguigu.gulimall.product.entity.CategoryEntity;

import java.util.List;
import java.util.Map;

/**
 * 商品三级分类
 *
 * @author dengwei
 * @email dengwei@gmail.com
 * @date 2024-04-06 02:22:49
 */
public interface CategoryService extends IService<CategoryEntity> {

    PageUtils queryPage(Map<String, Object> params);

    List<CategoryEntity> queryTreeList(Map<String, Object> params);

    void removeBatchIds(List<Long> asList);

    Long[] findCatelogPath(Long catelogId);

    void updateDetailById(CategoryEntity category);

    List<CategoryEntity> getLevel1CategoryList();

    List<CategoryEntity> getLevel1CategoryListForDemo();

    Map<String, List<Catelog2Vo>> getCatalogjson();

    //本地锁，锁的是当前进程
    Map<String, List<Catelog2Vo>> getCatalogjson1();
    //redis实现分布式锁
    Map<String, List<Catelog2Vo>> getCatalogjson2();
    //redisson实现分布式锁
    Map<String, List<Catelog2Vo>> getCatalogjson3();

    //spring-cache缓存
    Map<String, List<Catelog2Vo>> getCatalogjson4();

}

